const fs = require('fs')
let obj2 = { name: '程咬金', skinname: '功夫厨神'}
let arr = [{name: '后裔', skinname: '精灵王'}]
let data =   JSON.stringify(arr);
fs.writeFileSync('./data1.json',data)

fs.readFile('./data1.json','utf-8',function(err,data){
     let ojb3 = JSON.parse(data)
     ojb3.push(obj2)
     ojb3 = JSON.stringify(ojb3)
     fs.writeFileSync('./data1.json',ojb3)
})
